package com.toommi.refuse;

import com.toommi.refuse.listener.ApplicationReadyEventListener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * ..
 * 垃圾分类项目主程序入口
 *
 * @author yangg
 * @since 2019-07-23 11:38
 */
@SpringBootApplication
@MapperScan("com.toommi.refuse.mapper")
public class RefuseApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(RefuseApplication.class);
        application.addListeners(new ApplicationReadyEventListener());
        application.run(args);
    }
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(RefuseApplication.class);
    }
}
